package com.stars.empoly.utils.net

import com.stars.empoly.model.*
import com.stars.empoly.update.bean.UpdateBean
import com.trailer.base.net.PageResp
import com.trailer.base.net.Resp
import io.reactivex.Observable
import retrofit2.http.*
import java.util.HashMap

/**
 * Created by xianguangjin on 16/5/18.
 */
interface ApiService {



    /**
     *微信登录
     *
     * @return
     */
    @POST("app/member/weChatLogin")
    @FormUrlEncoded
    suspend fun weChatLogin(
        @Field("code") code: String?
    ): Resp<WeChatLogin>

    /**
     * 用户信息
     * @return
     */
    @POST("app/member/find")
    suspend fun getUser(): Resp<User>



    /**
     *首页banner
     *
     * @return
     */
    @POST("app/banner/list")
    suspend fun bannerList(): Resp<List<BannerBean>>

    /**
     * 反馈分类
     * @return
     */
    @POST("app/feedback/category")
    suspend fun category(): Resp<List<String>>

    /**
     * 反馈列表
     * @return
     */
    @FormUrlEncoded
    @POST("app/feedback/list")
    suspend fun feedbackList(
        @Field("pageSize") pageSize: Int?,
        @Field("page") page: Int?,
    ): PageResp<FeedbackList>



    /**
     *用户反馈
     *
     * @return
     */
    @POST("app/feedback/add")
    @FormUrlEncoded
    suspend fun feedbackAdd(
        @Field("category") category: String?,
        @Field("content") content: String?,
        @Field("image") image: String?,
    ): Resp<Any>

    /**
     * 用户地址列表
     * @return
     */
    @FormUrlEncoded
    @POST("app/memberAddress/list")
    suspend fun memberAddressList(
        @Field("pageSize") pageSize: Int?,
        @Field("page") page: Int?
    ): PageResp<AddressList>

    /**
     * 用户地址列表删除
     * @return
     */
    @FormUrlEncoded
    @POST("app/memberAddress/del")
    suspend fun memberAddressDel(
        @Field("id") id: String?,
    ): Resp<Any>


    /**
     * 用户地址列表添加
     * @return
     */
    @FormUrlEncoded
    @POST("app/memberAddress/add")
    suspend fun memberAddressAdd(
        @Field("realName") realName: String?,
        @Field("phone") phone: String?,
        @Field("address") address: String?,
        @Field("longitude") longitude: String?,
        @Field("latitude") latitude: String?,
        @Field("detailsAddress") detailsAddress: String?,
    ): Resp<Any>

    /**
     *设置默认地址
     * @return
     */
    @FormUrlEncoded
    @POST("app/memberAddress/setDefault")
    suspend fun setDefault(
        @Field("id") id: String?,
    ): Resp<Any>




    /**
     * 技师列表
     * @return
     */
    @FormUrlEncoded
    @POST("app/technician/list")
    suspend fun technicianList(
        @Field("realName") realName: String?,
        @Field("cityId") cityId: String?,
        @Field("technicianServiceId") technicianServiceId: String?,
        @Field("latitude") latitude: String?,
        @Field("longitude") longitude: String?,
        @Field("pageSize") pageSize: Int?,
        @Field("page") page: Int?
    ): PageResp<TechnicianList>


    /**
     * 用户关注
     * @return
     */
    @FormUrlEncoded
    @POST("app/memberFollow/follow")
    suspend fun follow(@Field("technicianId") technicianId: String?): Resp<Any>

    /**
     * 用户关注列表
     * @return
     */
    @FormUrlEncoded
    @POST("app/memberFollow/list")
    suspend fun memberFollowList(
        @Field("pageSize") pageSize: Int?,
        @Field("page") page: Int?
    ): PageResp<FollowList>

    /**
     * 用户注销
     * @return
     */
    @POST("app/member/logout")
    suspend fun memberLogout(): Resp<Any>


    /**
     * 技师服务列表
     * @return
     */
    @FormUrlEncoded
    @POST("app/platformService/list")
    suspend fun platformServiceList(
        @Field("technicianId") technicianId: String?,
        @Field("title") title: String?,
        @Field("sortCondition") sortCondition: String?
    ): Resp<ServiceList>

    /**
     * 消息-未读数量
     * @return
     */
    @POST("app/message/notReadNumber")
    suspend fun notReadNumber(): Resp<Int>


    /**
     * 列表-消息通知列表
     * @return
     */
    @POST("app/message/list")
    @FormUrlEncoded
    suspend fun msgNewsList(
        @Field("pageSize") pageSize: Int?,
        @Field("page") page: Int?,
    ): PageResp<TrMsgList>


    /**
     * 消息标记已读
     * @return
     */
    @POST("app/message/read")
    @FormUrlEncoded
    suspend fun messageRead(@Field("id") id: String?,@Field("type") type: String?): Resp<Any>



    /**
     * 消息删除
     * @return
     */
    @POST("app/message/del")
    @FormUrlEncoded
    suspend fun messageDel(@Field("id") id: String?): Resp<Any>


    /**
     * 用户下单计算车费
     * @return
     */
    @POST("app/order/getFare")
    @FormUrlEncoded
    suspend fun getFare(@Field("technicianId") technicianId: String?,@Field("memberAddressId") memberAddressId: String? ): Resp<FareBean>



    /**
     * 用户地址列表--获取默认地址
     * @return
     */
    @FormUrlEncoded
    @POST("app/memberAddress/list")
    suspend fun memberAddressListTo(
        @Field("pageSize") pageSize: Int?,
        @Field("page") page: Int?
    ): Resp<AddressTo>




    /**
     * 优惠券列表
     * @return
     */

    @POST("app/member/coupons")
    suspend fun coupons(): Resp<List<CouponsBean>>


    /**
     * 用户预约时间
     * @return
     */
    @FormUrlEncoded
    @POST("app/order/dateList")
    suspend fun dateList(@Field("technicianId") technicianId: String?): Resp<List<DateBean>>



    /**
     * 用户创建订单
     * @return
     */
    @POST("app/order/createOrder")
    @FormUrlEncoded
    suspend fun createOrder(@Field("technicianId") technicianId: String?,@Field("memberAddressId") memberAddressId: String?,
        @Field("platformServiceInfo") platformServiceInfo: String?,@Field("payType") payType: String?,
    @Field("serviceTime") serviceTime: String?,@Field("couponId") couponId: String?,
                            @Field("remarks")  remarks: String?
    ,@Field("payMoney") payMoney: String?): Resp<OrderPay>//CreateOrderBean  OrderPay




    /**
     * 用户订单列表
     * @return
     */
    @POST("app/order/list")
    @FormUrlEncoded
    suspend fun orderList(
        @Field("status") status: String?,
        @Field("pageSize") pageSize: Int?,
        @Field("page") page: Int?,
    ): PageResp<OrderList>



    /**
     * 用户的订单详情
     * @return
     */
    @POST("app/order/getOrder")
    @FormUrlEncoded
    suspend fun OrderDetail(
        @Field("id") id: String?
    ): Resp<UseOrderDetail>


    /**
     * 用户评价
     * @return
     */
    @POST("app/order/comment")
    @FormUrlEncoded
    suspend fun comment(@Field("orderId") orderId: String?,
                        @Field("stars") stars: String?,
                        @Field("isAnonymous") isAnonymous: String?,

    ): Resp<Any>



    /**
     * 技师申请城市
     * @return
     */
    @POST("app/technician/city")
    suspend fun cityList(): Resp<List<CityList>>


    /**
     * 技师申请
     * @return
     */
    @POST("app/technician/apply")
    @FormUrlEncoded
    suspend fun technicianApply(@Field("realName") realName: String?,@Field("sex") sex: String?,
                                @Field("age") age: String?,@Field("cityId") cityId: String?,
                                @Field("phone") phone: String?,@Field("lifePhoto") lifePhoto: String?,
                                @Field("invitation") invitation: String?,
                                ): Resp<Any>



    /**
     * 充值配置列表
     * @return
     */
    @POST("app/recharge/config")
    suspend fun rechargeConfig(): Resp<List<RechargeBean>>

    /**
     * 用户充值
     * @return
     */
    @FormUrlEncoded
    @POST("app/recharge/recharge")
    suspend fun rechargePay(@Field("money") money: String?,@Field("id") id: String?,
        @Field("payType") payType: String?): Resp<OrderPay>


    /**
     * 商户合作信息
     * @return
     */
    @POST("app/technician/findApply")
    suspend fun findApply(): Resp<FindApplyBean>

    /**
     * 技师的资金明细
     * @return
     */
    @FormUrlEncoded
    @POST("app/member/account")
    suspend fun memberAccountTo(
        @Field("timeType") timeType: String?,
        @Field("type") type: String?,
        @Field("time") time: String?,
        @Field("pageSize") pageSize: Int?,
        @Field("page") page: Int?,
    ): Resp<MemberListTo>
    /**
     * 技师的资金明细
     * @return
     */
    @FormUrlEncoded
    @POST("app/member/account")
    suspend fun memberAccount(
        @Field("origin") origin: String?,
        @Field("timeType") timeType: String?,
        @Field("type") type: String?,
        @Field("time") time: String?,
        @Field("pageSize") pageSize: Int?,
        @Field("page") page: Int?,
    ): PageResp<MemberList>


    /**
     * 技师服务详情
     * @return
     */
    @FormUrlEncoded
    @POST("app/platformService/find")
    suspend fun platformServiceFind(@Field("id") id: String?): Resp<ServiceDetails>



    /**
     * 用户待支付立即支付
     * @return
     */
    @FormUrlEncoded
    @POST("app/order/payOrder")
    suspend fun payOrder(@Field("id") id: String?,@Field("payType") payType: String?): Resp<OrderPay>


    /**
     * app版本配置
     * @return
     */
    @FormUrlEncoded
    @POST("app/config/appConfig")
    suspend fun payOrder(@Field("type") type: String?): Resp<UpdateBean>


    /**
     *协议
     *
     * @return
     */
    @POST("app/config/agreement")
    suspend fun agreementList(): Resp<Agreement>



    /**
     * 提现利率
     * @return
     */
    @POST("app/config/list")
    suspend fun configList(): Resp<ConfigBean>









    //------------------------------------------------------


    /**
     * 消息-分页
     * @return
     */
    @FormUrlEncoded
    @POST("User_center/messageList")
    suspend fun msgListPage(
        @Field("page_num") page_num: Int?,
        @Field("page") page: Int?
    ): PageResp<MsgList>







    /**
     * 极光一键登录
     *
     * @return
     */
    @POST("api/index/jiguangLogin")
    @FormUrlEncoded
    fun jiguangLogin(@Field("loginToken") loginToken: String): Observable<Resp<LoginBean>>


    /**
     *微信登录
     *
     * @return
     */
    @POST("api/index/wxLogin")
    @FormUrlEncoded
    fun wxLogin(@Field("code") code: String?): Observable<Resp<LoginBean>>


    /**
    简易版注册
     *
     * @return
     */
    @POST("api/index/siml_register")
    @FormUrlEncoded
    fun simlRegister(@Field("mobile") mobile: String?, @Field("type") type: String?): Observable<Resp<LoginBean>>


    /**
     * 货源列表
     * @return
     */
    @GET("api/info/infoList")
    suspend fun infoList(
            @Query("k") k: String?,
            @Query("sp") sp: String?, @Query("sc") sc: String?, @Query("sa") sa: String?,
            @Query("rp") rp: String?, @Query("rc") rc: String?, @Query("ra") ra: String?,
            @Query("type_id") type_id: String?, @Query("s_time1") s_time1: String?, @Query("s_time2") s_time2: String?,
            @Query("r_time1") r_time1: String?, @Query("r_time2") r_time2: String?, @Query("price1") price1: String?,
            @Query("price2") price2: String?, @Query("sort") sort: String?, @Query("asc") asc: String?,

            @Query("info_state") info_state: String?,
            @Query("goods_type") goods_type: String?,
            @Query("p") p: Int): Resp<List<InfoListBean>>


    /**
     * 银行卡信息-保存
     * @return
     */
    @POST("api/user/setCard")
    @FormUrlEncoded
    fun setCardBank(@Field("name") name: String?, @Field("number") number: String?,
                    @Field("bank") bank: String?, @Field("kbank") kbank: String?,
                    @Field("image") image: String?): Observable<Resp<Any>>


    /**
     * 获取信息-认证信息 身份 车辆 公司 银行卡  7账单列表筛选条件 6：车辆类型
     * @return
     */
    @GET("api/user/getInfo")
    fun getInfo(@Query("type") type: String?): Observable<Resp<InfoBean>>


    /**
     * 识别身份证-OCR
     * @return
     */
    @GET("api/wxocr/cv_bankCard")
    fun cvBankCard(@Query("img") img: String?): Observable<Resp<BankCard>>


    /**
     * 金额统计-资金
     * @return
     */
    @GET("api/amount/amountCount")
    fun amountCount(): Observable<Resp<AmountCount>>


    /**
     * 明细列表-资金
     * @return
     */
    @GET("api/amount/amountList")
    suspend fun amountList(
            @Query("status") status: String,
            @Query("type") type: String,
            @Query("time_start") time_start: String,
            @Query("time_end") time_end: String,
            @Query("p") p: Int): Resp<List<AmountList>>

    /**
     * 资金提现-资金
     * @return
     */
    @POST("api/amount/withdraw")
    @FormUrlEncoded
    fun withdraw(@Field("money") money: String?, @Field("name") name: String?,
                 @Field("bank") bank: String?, @Field("kbank") kbank: String?,
                 @Field("number") number: String?
    ): Observable<Resp<Any>>


    /**
     * 系统卡号-资金
     * @return
     */
    @GET("api/amount/getCard")
    fun getCard(): Observable<Resp<Card>>


    /**
     * 资金充值-资金
     * @return
     */
    @POST("api/amount/amountAdd")
    @FormUrlEncoded
    fun amountAdd(@Field("money") money: String?,
                  @Field("pic") pic: String?
    ): Observable<Resp<Any>>


    /**
     * 列表-消息
     * @return
     */
    @GET("api/msg/msgList")
    suspend fun msgList(@Query("p") p: Int): Resp<List<MsgList>>


    /**
     * 文章详情
     * @return
     * 7平台服务协议8平台运输协议9隐私政策10用户协议11关于我们
     */
    @GET("api/article/info")
    suspend fun articleInfo(@Query("article_id") article_id: String?): Resp<ArticleInfo>


    /**
     * 统计折线-货主
     * @return
     */
    @GET("api/amount/amountLine")
    suspend fun amountLine(@Query("start_time") start_time: String?,
                           @Query("end_time") end_time: String?, @Query("k") k: String?
    ): Resp<IconData>


    /**
     * 消息详情
     * @return
     */
    @GET("api/msg/msgGet")
    suspend fun msgGet(@Query("id") id: String?): Resp<MsgGet>








    //---------------------------------------------------------------------------------


    @POST("api/common/getOssSign")
    @FormUrlEncoded
    fun getSignedUrl(@Field("type") type: String?): Observable<Resp<ImageSign>>



    /**
     *订单管理- 订单列表
     * @return
     */
    @GET("api/order/index")
    suspend fun orderList(@Query("type") type: String?, @Query("length") length: String?,
                          @Query("offset") offset: Int): Resp<List<CompreBean>>


    /**
     *密码登录
     *
     * @return
     */
    @POST("api/user/login")
    @FormUrlEncoded
    suspend fun login(
            @Field("mobile") mobile: String?,
            @Field("password") pwd: String?,
            @Field("type") type: String?,
            @Field("regid") regid: String?,
    ): Resp<LoginBean>


    /**
     *验证码登录
     *
     * @return
     */
    @POST("api/user/mobilelogin")
    @FormUrlEncoded
    suspend fun mobilelogin(
            @Field("mobile") mobile: String?,
            @Field("code") code: String?,
            @Field("type") type: String?,
            @Field("regid") regid: String?,
    ): Resp<LoginBean>

    /**
     * 注册
     *
     * @return
     */

    @POST("api/user/register")
    @FormUrlEncoded
    suspend fun register(@Field("mobile") mobile: String?,

                         @Field("type") type: String?,

                         @Field("code") code: String?
    ): Resp<LoginBean>


    /**
     * 获取区域
     * @return
     */
    @POST("api/area/index")
    @FormUrlEncoded
    suspend fun getArea(@Field("id") id: String?): Resp<List<AreaBean>>


    /**
     * 订单管理-板车类型
     *
     * @return
     */
    @POST("api/category/index")
    suspend fun categoryIndex(): Resp<List<CarCategory>>


    /**
     * 订单管理-发布货源
     *
     * @return
     */

    @POST("api/order/add")
    @FormUrlEncoded
    suspend fun orderAdd(@Field("vehicle_model") vehicle_model: String?,
                         @Field("vehicle_status") vehicle_status: String?,
                         @Field("start_city_name") start_city_name: String?,
                         @Field("start_lat") start_lat: String?,
                         @Field("start_lng") start_lng: String?,
                         @Field("end_city_name") end_city_name: String?,
                         @Field("end_lat") end_lat: String?,
                         @Field("end_lng") end_lng: String?,
                         @Field("start_address") consignor_address: String?,
                         @Field("start_position") consignor_position: String?,
                         @Field("end_address") end_address: String?,
                         @Field("end_position") end_position: String?,
                         @Field("payment") payment: String?,
                         @Field("remarks") remarks: String?,
                         @Field("start_driving_time") start_driving_time: String?,
                         @Field("end_driving_time") end_driving_time: String?,
                         @Field("type_id") type_id: String?,
                         @Field("consignor_name") consignor_name: String?,
                         @Field("consignor_mobile") consignor_mobile: String?,
                         @Field("update_amount ") update_amount: String?,
                         @Field("receiving_name") receiving_name: String?,
                         @Field("receiving_mobile") receiving_mobile: String?


    ): Resp<OrderAdd>


    /**
     * 订单管理-计算费用
     *
     * @return
     */
    @POST("api/order/calculation")
    @FormUrlEncoded
    suspend fun calculation(@Field("start_lat") start_lat: String?,
                            @Field("start_lng") start_lng: String?,
                            @Field("end_lat") end_lat: String?,
                            @Field("end_lng") end_lng: String?,
                            @Field("type_id") type_id: String?
    ): Resp<Calculation>


    /**
     *订单管理- 订单详情
     * @return
     */
    @POST("api/order/detail")
    @FormUrlEncoded
    suspend fun orderDetail(@Field("order_id") order_id: String?): Resp<CompreDetailsBean>

    /**
     *订单管理- 订单状态
     * @return
     */
    @POST("api/order/status")
    @FormUrlEncoded
    suspend fun orderStatus(@Field("order_id") order_id: String?): Resp<OrderStatus>


    /**
     * 订单管理-取消订单
     *
     * @return
     */
    @POST("api/order/cancel")
    @FormUrlEncoded
    suspend fun orderCancel(@Field("order_id") order_id: String?): Resp<Any>


    /**
     *司机端- 司机端首页
     * @return
     */
    @POST("api/index/index")
    @FormUrlEncoded
    suspend fun orderListHome(@Field("lat") lat: String?, @Field("lng") lng: String?,
                              @Field("start_time") start_time: String?, @Field("end_time") end_time: String?,
                              @Field("start_city_name") start_city_name: String?, @Field("end_city_name") end_city_name: String?,
                              @Field("length") length: String?,
                              @Field("offset") offset: Int): Resp<List<CompreBean>>


    /**
     * 司机端-司机端首页头部
     *
     * @return
     */
    @POST("api/index/indexTop")
    suspend fun indexTop(): Resp<IndexTop>


    /**
     *司机端- 更新司机经纬度
     * @return
     */
    @POST("api/user/upateDriverPosition")
    @FormUrlEncoded
    suspend fun upateDriverPosition(@Field("lat") lat: String?, @Field("lng") lng: String?): Resp<Any>


    /**
     *司机端- 抢单
     * @return
     */
    @POST("api/order/grabbingOrders")
    @FormUrlEncoded
    suspend fun grabbingOrders(@Field("order_id") order_id: String?): Resp<OrderAdd>


    /**
     * 修改订单状态
     * @return
     */
    @POST("api/order/updateOrder")
    @FormUrlEncoded
    suspend fun updateOrder(@Field("order_id") order_id: String?, @Field("status") status: String?,
                            @Field("service_pic") service_pic: String?): Resp<Any>


    /**
     * 司机端-司机认证
     *
     * @return
     */
    @POST("api/user/attestation")
    @FormUrlEncoded
    suspend fun attestation(@Field("owner_name") owner_name: String?,
                            @Field("car_type") car_type: String?,
                            @Field("identity_card") identity_card: String?,
                            @Field("vehicle_name") vehicle_name: String?,
                            @Field("plate_number") plate_number: String?,
                            @Field("vehicle_avatar") vehicle_avatar: String?,
                            @Field("driving_license") driving_license: String?,
                            @Field("driver_license") driver_license: String?


    ): Resp<Any>


    /**
     * 重置密码
     * @return
     */
    @POST("api/user/resetpwd")
    @FormUrlEncoded
    suspend fun setPassword(
            @Field("type") type: String?, @Field("mobile") mobile: String?,
            @Field("newpassword") newpassword: String?, @Field("captcha") captcha: String?,
    ): Resp<Any>


    /**
     *用户信息-修改用户信息
     * @return
     */
    @POST("api/user/profile")
    @FormUrlEncoded
    suspend fun profile(@Field("username") username: String?, @Field("avatar") avatar: String?): Resp<Any>


    /**
     *司机认证详情接口
     *
     * @return
     */
    @POST("api/user/attestationDetail")
    suspend fun attestationDetail(): Resp<AttestationDetail>


    /**
     * 用户信息-忘记密码发送短信
     *
     * @return
     */
    @POST("api/sms/send")
    @FormUrlEncoded
    suspend fun getPassword(@Field("mobile") mobile: String?,
                            @Field("event") event: String?,
                            @Field("type") type: String?
    ): Resp<Any>


    /**
     * 列表-消息通知列表
     * @return
     */
    @POST("api/news/index")
    @FormUrlEncoded
    suspend fun msgNewsList(@Field("length") length: String?,
                            @Field("offset") offset: Int): Resp<List<TrMsgList>>


    /**
     * 消息-已读
     * @return
     */
    @POST("api/news/click")
    @FormUrlEncoded
    suspend fun msgRead(@Field("id") id: String?): Resp<Any>


    /**
     * 发票-列表
     * @return
     */
    @POST("api/invoice/order")
    @FormUrlEncoded
    suspend fun invoiceOrder(@Field("length") length: String?,
                             @Field("offset") offset: Int): Resp<List<CompreBean>>


    /**
     * 发票-申请开票
     * @return
     */
    @POST("api/invoice/add")
    @FormUrlEncoded
    suspend fun invoiceAdd(
            @Field("title") title: String?, @Field("duty_paragraph") duty_paragraph: String?,
            @Field("type") type: String?, @Field("order_ids") order_ids: String?,
            @Field("amount") amount: String?, @Field("way") way: String?,
            @Field("email") email: String?,

            ): Resp<Any>


    /**
     * 发票-申请开票列表
     * @return
     */
    @POST("api/invoice/index")
    @FormUrlEncoded
    suspend fun invoiceList(@Field("length") length: String?,
                            @Field("offset") offset: Int): Resp<List<InvoiceData>>


    /**
     * 司机收益头部
     * @return
     */
    @GET("api/user/driverProfitTop")
    suspend fun driverProfitTop(): Resp<DriverProfitTop>


    /**
     *订单管理- 订单列表
     * @return
     */
    @GET("api/user/driverProfit")
    suspend fun driverProfit(@Query("type") type: String?, @Query("length") length: String?,
                             @Query("offset") offset: Int): Resp<List<DriverProfit>>


    /**
     * 编辑-意见反馈
     * @return
     */
    @POST("api/feedback/add")
    @FormUrlEncoded
    suspend fun feedbackAdd(@Field("content") content: String?): Resp<Any>


    /**
     * 消息推送
     * @return
     */
    @POST("api/news/messagePush")
    @FormUrlEncoded
    suspend fun messagePush(
            @Field("user_id") user_id: String?,
            @Field("title") title: String?,
            @Field("content") content: String?,
            @Field("url") url: String?,
    ): Resp<Any>


    /**
     * 订单支付
     * @return
     */
    @POST("api/pay/index")
    @FormUrlEncoded
    suspend fun orderPay(
            @Field("order_id") order_id: String?,
            @Field("amount") amount: String?,
            @Field("type") type: String?,
    ): Resp<OrderPay>


    /**
     * 设置密码
     * @return
     */

    @POST("api/user/updatePassword")//  type:1设置支付密码  0:登录密码
    @FormUrlEncoded
    suspend fun setPwd(@FieldMap params: HashMap<String, String>): Resp<Any>



    /**
     * 搜索城市名称
     * @return
     */
    @POST("api/area/getArea")
    @FormUrlEncoded
    suspend fun getSearchArea(@Field("name") name: String?): Resp<AreaBean>



    /**
     * 申请提现
     * @return
     */
    @POST("api/user/withdrawal")
    @FormUrlEncoded
    suspend fun withdrawal(
            @Field("amount") amount: String?,
            @Field("type") type: String?,
            @Field("account_number") account_number: String?,
            @Field("account_name") account_name: String?,
            @Field("mobile") mobile: String?,
            @Field("code") code: String?,
    ): Resp<Any>

    /**
     * 选择车型
     * @return
     */
    @GET("api/user/carlist")
    suspend fun typeGet(): Resp<List<TypeGet>>


    /**
     *我的收益-新
     * @return
     */
    @GET("api/user/Query")
    suspend fun Query(@Query("order_id") order_id: String?, @Query("length") length: String?,
                             @Query("offset") offset: Int): Resp<List<DriverProfit>>



    /**
     *我的收益-新-列表
     * type 1：平台收益  2轿车收益
     * status 0：全部   1已完成
     * @return
     */
    @GET("api/user/Query")
    suspend fun QueryList(@Query("type") type: String?,
                          @Query("status") status: String?,
                          @Query("length") length: String?,
                      @Query("offset") offset: Int): Resp<List<DriverProfit>>


}
